package com.ruoyi.project.manhua.webLook.controller;

import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.project.manhua.webLook.service.MhSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;


/**
 * 漫画章节 Controller
 * 
 * @author yuan
 * @date 2021-01-13
 */
@Controller
@RequestMapping("/manhua/look/search")
public class MhSearchController extends BaseController
{
    private String prefix = "manhua/look";


    @Autowired
    private MhSearchService mhSearchService;



    /**
     * 首页请求
     * @return
     */
    @GetMapping("")
    public String search()
    {
        return prefix+"/search";
    }

    /**
     * 首页请求
     * @return
     */
    @PostMapping("/namevalue")
    @ResponseBody
    public AjaxResult searchControllerName()
    {
        return AjaxResult.success(mhSearchService.searchServiceName());
    }


    /**
     * 首页请求
     * @return
     */
    @PostMapping("/dataname")
    @ResponseBody
    public AjaxResult searchControllerLike(@RequestParam("value")String value)
    {
        return AjaxResult.success(mhSearchService.searchSerivceLike(value));
    }


}
